package com.example.micrweb;

import com.example.common.util.JwtUtil;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

// 启动duboo服务
@EnableDubbo
@SpringBootApplication
public class MicrWebApplication {

    @Value("${jwt.secret}")
    private String secret;
    // 创建Jwtutil对象
    @Bean
    public JwtUtil jwtUtil(){
        JwtUtil jwtUtil = new JwtUtil(secret);
        return jwtUtil;
    }
    public static void main(String[] args) {
        SpringApplication.run(MicrWebApplication.class, args);
    }

}
